package Package.service.impl;

import Package.dao.UserDao;
import Package.service.UserService;

public class UserServiceImpl implements UserService {

    private UserDao userDao;

    private String userName;
    private int userAge;

    @Override
    public void show() {
        userDao.show();
        System.out.println("UserService is running------"+userName+userAge);
    }

    //构造方法
//    public UserServiceImpl(UserDao userDao, String userName, int userAge) {
//        this.userDao = userDao;
//        this.userName = userName;
//        this.userAge = userAge;
//    }

    //setter
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setUserAge(int userAge) {
        this.userAge = userAge;
    }
}
